package com.itheima.web.controller;

import com.itheima.service.store.OrdersService;
import com.itheima.service.store.ProductService;
import com.itheima.service.store.TravellerService;
import com.itheima.service.store.impl.OrdersServiceImpl;
import com.itheima.service.store.impl.ProductServiceImpl;
import com.itheima.service.store.impl.TravellerServiceImpl;
import com.itheima.service.system.PermissionService;
import com.itheima.service.system.RoleService;
import com.itheima.service.system.SysLogService;
import com.itheima.service.system.UserService;
import com.itheima.service.system.impl.PermissionServiceImpl;
import com.itheima.service.system.impl.RoleServiceImpl;
import com.itheima.service.system.impl.SysLogServiceImpl;
import com.itheima.service.system.impl.UserServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

public class BaseServlet extends HttpServlet {

    protected SysLogService sysLogService;
    protected OrdersService ordersService;
    protected ProductService productService;
    protected RoleService roleService;
    protected PermissionService permissionService;
    protected TravellerService travellerService;
    protected UserService userService;


    @Override
    public void init() throws ServletException {

        sysLogService = new SysLogServiceImpl();
        ordersService = new OrdersServiceImpl();
        productService = new ProductServiceImpl();
        roleService = new RoleServiceImpl();
        permissionService = new PermissionServiceImpl();
        travellerService = new TravellerServiceImpl();
        userService = new UserServiceImpl();

    }
}
